-- GENERATED SPELL FOR [Mag'har Hunter] --


function spell0_16912(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(12024,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16912', 5278, 1)
end

function spell1_16912(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16912', 597, 1)
end

function spell2_16912(pUnit, Event) --@Summon Tamed Ravager,Self--
pUnit:FullCastSpellOnTarget(32730,pUnit)
pUnit:RegisterEvent('Sorts_16912', 589, 1)
end

function Sorts_16912(pUnit, Event)
local choix_sorts_16912 = math.random(0, 2)
if choix_sorts_16912 == 0 then
pUnit:RegisterEvent('spell0_16912', 1, 1)
end
if choix_sorts_16912 == 1 then
pUnit:RegisterEvent('spell1_16912', 1, 1)
end
if choix_sorts_16912 == 2 then
pUnit:RegisterEvent('spell2_16912', 1, 1)
end
end

function mob16912_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16912', math.random(1500, 3000), 1)
end

function mob16912_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16912_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16912_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16912, 1, 'mob16912_Action')
RegisterUnitEvent(16912, 2, 'mob16912_Leave')
RegisterUnitEvent(16912, 3, 'mob16912_Kill')
RegisterUnitEvent(16912, 4, 'mob16912_Die')
